[WC-3163] Treenode v2#2166
Conversation
iobuhov
left a comment
There was a problem hiding this comment.
Approve, but not all changes requested have been implemented.
AI Code Review
What was reviewed
Skipped (out of scope): Findings🔶 Medium — Missing CHANGELOG entry for new featureFile: ## [Unreleased]
### Added
- We added a `Parent association` property that enables infinite-depth lazy-loading tree hierarchies (Tree Node V2).🔶 Medium — Direct mutation of
|
fabba09 to
84b8919
Compare
AI Code Review
What was reviewed
Skipped (out of scope): Findings🔶 Medium — CHANGELOG entry missing for new featureFile: ### Added
- We added a `parentAssociation` property that enables a v2 lazy-loading mode for infinite-depth hierarchies using a self-referencing association.🔶 Medium —
|
AI Code Review
What was reviewed
Skipped (out of scope): Findings🔶 Medium — No CHANGELOG.md entry for runtime behavior changeFile: 🔶 Medium — Direct state mutation on
|
AI Code Review
What was reviewed
Skipped (out of scope): Findings🔶 Medium — Missing CHANGELOG entry for new featureFile: ### Added
- We added the `parentAssociation` property to enable infinite-depth lazy-loaded tree hierarchies (V2 mode).🔶 Medium —
|
AI Code Review
What was reviewed
Skipped (out of scope): Findings🔶 Medium — CHANGELOG entry missing for new XML property and v2 behaviorFile: ## [Unreleased]
### Added
- We added a new `parentAssociation` property that enables infinite-depth hierarchies using a self-referencing association, powered by a new lazy-loading tree renderer (v2).🔶 Medium — Direct mutation of
|
AI Code Review
What was reviewed
Skipped (out of scope): Findings🔶 Medium — Direct mutation of
|
AI Code Review
What was reviewed
Skipped (out of scope): Findings🔶 Medium — No unit tests for any V2 codeFile:
🔶 Medium — Direct mutation of
|
AI Code Review
What was reviewed
Skipped (out of scope): Findings🔶 Medium — Direct mutation of
|
AI Code Review
What was reviewed
Skipped (out of scope): Findings🔶 Medium — Keyboard users cannot expand/collapse v2 tree nodesFile: Fix: Add an <li
role="treeitem"
tabIndex={0}
aria-expanded={hasChildren ? isExpanded : undefined}
onClick={hasChildren ? () => onNodeClick(node) : undefined}
onKeyDown={hasChildren ? e => {
if (e.key === "Enter" || e.key === " ") {
e.preventDefault();
onNodeClick(node);
}
} : undefined}
>🔶 Medium — Direct mutation of ref-backed tree nodes triggers fragile re-renderFile: Fix: Keep expand/collapse state in proper React state or manage it through // In useIncrementalTreeData, expose a toggle function
const toggleNode = useCallback((nodeId: string, nextState: TreeNodeState) => {
const node = nodesByIdRef.current.get(nodeId);
if (node) {
node.treeNodeState = nextState;
setTreeData([...rootsRef.current]);
}
}, []);🔶 Medium —
|
Pull request type
Description